
function stateArr(obj) {
    let arr = []
    Object.keys(obj).forEach(key => {
      arr.push(Object.assign(obj[key], { status: +key }))
    })
    return arr
  }
  const getters = {
    sidebar: state => state.app.sidebar,
    device: state => state.app.device,
    token: state => state.user.token,
    msgStateObj: state => state.msg.msgStateObj,
    msgStateArr: state => [{ label: "全部", status: null }].concat(stateArr(state.msg.msgStateObj)),
    userInfo: state => state.user.userInfo,
    userRoles: state => state.user.userRoles,
    menus: state => state.user.menus,
    appCode: state => state.user.appCode,
    billState: state => state.bill.billState,
    billStateArr: state => stateArr(state.bill.billState),
    taskState: state => state.task.taskState,
    taskStateArr: state => stateArr(state.task.taskState),
    fileUrl : state=>'http://p1455d8689.imwork.net/'
  }
  export default getters